/* --- Global Styles & Branding Colors --- */
:root {
    --qcpl-blue: #004d9c;   /* Dark Blue/QCPL Primary Color */
 /*    --qcpl-yellow: #ffcc00; /* Yellow/Gold Highlight Color */
  /*   --light-bg: #f5f5f5;    /* Very light gray background */
   /*  --card-dark: #343a40;   /* Dark gray for card background */

   /* Primary Action/Brand Color: Light, Sky Blue */
    --qcpl-blue2: #00BFFF;      /* Standard Sky Blue (You can choose any light blue hex code) */ 
 /* Secondary color for the gradient fade (a slightly deeper light blue) */
    --qcpl-light-fade: #4DCEFF; 
    
    /* Highlight Color: More saturated Gold/Yellow (Kept for contrast) */
    --qcpl-yellow: #FFB700;    
    /* Neutral Background: Very light, subtle hint of gray/blue */
    --light-bg: #F8FAFC;       
    /* Dark Text/Card Color: Near black for maximum contrast */
    --card-dark: #212529;      
    /* Subtle Border/Divider Color */
    --border-light: #E0E7FF;


}

body {
    background-color: var(--light-bg);
    font-family: 'Arial', sans-serif;
    margin: 0;
    padding: 0;
}

/* --- Header & Title --- */
.main-header {
       /* Use linear-gradient for the fade effect */
    background-image: linear-gradient(
        to right, 
        var(--qcpl-blue2) 0%, 
        #1A5EA8 70%, /* A slightly lighter shade of blue */
        var(--qcpl-blue) 100%
    ); 
    
    /* Fallback color if gradients aren't supported (or just in case) */
    background-color: var(--qcpl-blue);
    
    box-shadow: none; 
    padding: 10px 5%;
    display: flex;
    justify-content: flex-start;
    align-items: center;
   
}

.header-content {
    display: flex;
    align-items: center;
}

.library-logo {
    max-height: 70px; /* Reduced logo size */
    margin-right: 15px;
    width: auto;
}

.library-name {
    font-size: 1.2rem;
    font-weight: bold;
    color: var(--qcpl-blue);
    margin: 0;
}

/* --- Portal Title (Mimics the clean badge style) --- */
.portal-title-container {
    text-align: center;
    padding: 10px 20px 20px; /* More vertical space */
}

.portal-title {
    font-size: 2.5rem;
    color: var(--card-dark);
    display: inline-block;
    padding: 10px 30px;
    /* Create the white/gray badge effect with a border and shadow */
    border: 1px solid #ddd;
    border-radius: 8px;
    background-color: #ffffff;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.portal-title .highlight {
    color: var(--qcpl-yellow);
    font-weight: 700;
}

/* --- Resource Grid --- */
.resource-grid-container {
    display: grid;
    /* 5 columns is excellent, let's keep it responsive */
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 15px; /* Tighter gap for a solid block look */
    max-width: 1200px;
    margin: 0 auto 80px;
    padding: 0 5%;
}

.resource-card-link {
    display: block; 
    position: relative;
    /* Remove text underline that sometimes appears */
    text-decoration: none; 
}

.resource-card {
    background-color: var(--card-dark); /* Dark background like the original */
    color: #ffffff;
    border-radius: 8px;
    padding: 15px 10px;
    height: 150px; /* Fixed, uniform height for the grid */
    display: flex;
    justify-content: center;
    align-items: center;
    transition: transform 0.2s ease, box-shadow 0.2s ease, background-color 0.2s ease;
}

.resource-card:hover {
    transform: scale(1.05); /* Slight zoom/lift effect */
    box-shadow: 0 6px 15px rgba(0, 0, 0, 0.2);
    background-color: var(--qcpl-blue); /* Highlight on hover */
    z-index: 2; /* Ensures the lifted card is on top */
}

.resource-logo {
    /* Set a max size to ensure all logos fit uniformly */
    max-width: 100%;
    max-height: 155px;
    object-fit: contain;
    /* Optional: Ensure logos look good on the dark background */
    filter: brightness(1.2); 
}

/* --- Tooltip Redesign (Clean and Modern) --- */
.tooltip {
    position: relative; 
}

.tooltip .tooltiptext {
    visibility: hidden;
    width: 250px; 
    background-color: var(--qcpl-blue); /* Use a branded color for the background */
    color: #ffffff;
    text-align: left;
    border-radius: 8px;
    padding: 15px;
    font-size: 0.9rem;
    position: absolute;
    z-index: 10;
    bottom: 110%; /* Position above the card, further away */
    left: 50%;
    transform: translateX(-50%);
    opacity: 0;
    transition: opacity 0.3s;
    pointer-events: none; 
}

.tooltip-title {
    font-size: 1rem;
    font-weight: bold;
    color: var(--qcpl-yellow); /* Use the highlight color for the title */
    margin-top: 0;
    margin-bottom: 5px;
}

.tooltip:hover .tooltiptext {
    visibility: visible;
    opacity: 1;
}

/* --- Responsive Adjustments --- */
@media (max-width: 1024px) {
    .resource-grid-container {
        grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); /* 4 columns on tablets */
    }
}

@media (max-width: 600px) {
    .portal-title {
        font-size: 1.5rem;
        padding: 8px 15px;
    }
    .resource-grid-container {
        grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); /* 2-3 columns on phones */
    }
    .resource-card {
        height: 70px;
    }
    .library-name {
        font-size: 1rem;
    }
}
















/* New style for the title text below the card */
.resource-title-text {
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--card-dark); /* Dark gray text */
    margin-top: 6px;        /* Small margin between card and text */
    margin-bottom: 0;       /* Remove default paragraph margin */
    /* Ensure long titles are handled gracefully */
    height: 2.2em;          /* Fixed height for 2 lines of text */
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 2;  /* Limit to 2 lines */
    -webkit-box-orient: vertical;
    transition: color 0.2s ease;
    text-align: center !important; /* Force center alignment */
}









.portal-title {
    color: var(--card-dark);
    font-size: 2.2rem;
    font-weight: 800; /* Made it bolder for presence */
    text-transform: uppercase; /* Ensures a clean, uniform look */
    
    /* ADDED: Subtle spacing for a modern, expansive look */
    letter-spacing: 2px; 
    
    margin: 1;
    padding: 1;
}

/* We should also ensure the subtitle (if you have one) is styled nicely */
.portal-subtitle {
    color: #6c757d; /* Slightly lighter gray */
    font-size: 1.1rem;
    font-weight: 400;
    margin-top: 10px; /* Space below the main title */
}

/* Responsive adjustment for mobile screens */
@media (max-width: 600px) {
    .portal-title {
        font-size: 1.5rem;
        letter-spacing: 1px; 
    }
}
